﻿ CREATE  proc [dbo].[danhmucTyGia_Sua]  
@thang varchar(5),  
@nam varchar(5),  
@nt varchar(10),  
@tygia float  
  
as  
if exists(select * from DM_tygia  Where thang <>@thang  and nam <>@nam and nt<>@nt   )  
begin  
select ErrCode=0  
end  
else  
begin  
update DM_tygia    set tygia=@tygia    
  
  Where thang =@thang  and nam =@nam and nt=@nt   
   
select ErrCode=1  
end